<template>
	<view>
		<!--pages/student/student.wxml-->
		<view class="title">
			{{listName}}
		</view>
		<view class="container">
			<view class="line" v-for="(item, index) in students" :key="index">
				<view>{{item}}</view>
				<view class="right" @click="jumpToAttend()">查看考勤</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				listName: '',
				students: [
					"叶耀明", "林晓青", "熊栩彬", "沈聪", "黄健斌", "赵铭"
				]
			};
		},
		onLoad(e) {
			let listType = e.listType;
			if(listType == "teacher"){
				this.listName = "全部老师";
				this.students =  [
					"叶耀明", "林晓青", "熊栩彬", "沈聪", "黄健斌", "赵铭"
				];
			}else{
				this.listName = "全部学生";
				this.students =  [
					"罗晓明", "李佳佳", "赵晓春", "林晓杰", "王泽华", "刘三"
				];
			}
		},
		methods: {
			jumpToAttend: function(){
				uni.navigateTo({
					url:"../attendRecord/attendRecord"
				})
			},
			showStaff: function(){
				
			}
		}
	};
</script>
<style>
	/* pages/student/student.wxss */
	page{
		background-color: #F3F5F7;
	}
	.title {
		font-size: 34rpx;
		margin: 10rpx 40rpx;
		color: #FD973F;
	}

	.container {
		/* padding: 0 4vw; */
		margin: 10rpx 30rpx;
		border-radius: 24rpx;
		padding: 10rpx 30rpx;
		background: white;
	}

	.line {
		/* width: 100%; */
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		border-bottom: 1rpx solid #E0E3DA;
		padding: 20rpx 0rpx;
		
	}
	.right {
		width: 40%;
		text-align: right;
		color: #FF9400;
		font-size: 16px;
	}
</style>
